<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simRunSimulatorEx</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1><a href="../apiOverview.htm">Regular API</a> function</h1>
<h3 class=subsectionBar><a name="simRunSimulatorEx" id="simRunSimulatorEx"></a>simRunSimulatorEx</h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Runs the simulator. Should be the first and last command run. This will launch the main simulator loop. See also <a href="simQuitSimulator.htm">sim.quitSimulator</a> and the section on the <a href="../mainClientApplication.htm">main client application</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simRunSimulatorEx(const simChar* applicationName,simInt options,simVoid(*initCallBack)(),simVoid(*loopCallBack)(),simVoid(*deinitCallBack)(),simInt stopDelay,simChar* sceneOrModelToLoad)<br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>applicationName</strong>: ignored</div>
<div><strong>options</strong>: <a href="../apiConstants.htm#startupOptions">start-up options</a> (combine them with the OR operator)</div>
<div><strong>initCallBack</strong>: the call-back address of the initialization routine. The initialization routine will be called just once, and should be used to load plugins for instance. Can be nullptr for the default initialization routine.</div>
<div><strong>loopCallBack</strong>: the call-back address of the main simulator loop. That routine is called continuously in a loop, and should react to simulator messages (<a href="simGetSimulatorMessage.htm">simGetSimulatorMessage</a>), and handle running simulations. Can be nullptr for the default loop routine.</div>
<div><strong>deinitCallBack</strong>: the call-back address of the deinitialization routine. The deinitialization routine will be called just once, before the simulation ends, and should be used to unload plugins for instance. Can be nullptr for the default deinitialization routine.</div>
<div><strong>stopDelay</strong>: a delay in simulation milliseconds, after which the first simulation run will stop, or 0 for no automatic stopping.</div>
<div><strong>sceneOrModelToLoad</strong>: the name of the initial scene or model to load.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>1 if the command was successfull<br>
</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn><div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div></div></td> 
</tr> 
</table> 

<br>
<p><a href="../apiFunctions.htm">All regular API functions on one page</a></p>
<br>
<br>
</td>
</tr>
</table>
</div>
</body>
</html>
